import { createI18n } from 'vue-i18n'
import zhCN from './locales/zh-CN'
import en from './locales/en'
import zhTW from './locales/zh-TW'

const messages = {
  'zh-CN': { ...zhCN },
  'en': { ...en },
  'zh-TW': { ...zhTW }
}

const i18n = createI18n({
  legacy: false,
  globalInjection: true,
  // locale: uni.getStorageSync('lang') || 'zh-CN',
  locale: 'zh-CN',
  messages
})

export default i18n